package org.quxiao.mmrsql.executor.test;

import java.io.IOException;

import org.apache.hadoop.mapreduce.Job;
import org.quxiao.mmrsql.executor.job.builder.JobBuilder;

public class JobBuilderTester {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception{
		Job tableValueJob1, tableValueJob2, tableJoinJob;
		String table1, table2, family1, family2, qualified1, qualified2;
		String outPath1, outPath2;
		
		table1 = "Asset_100000";
		family1 = "MetaData";
		qualified1 = "type";
		outPath1 = "/home/ubuntu/job_builder_test/table_value/" + table1 + "_" + System.currentTimeMillis();
		
		table2 = "Asset_1000000";
		family2 = "MetaData";
		qualified2 = "type";
		outPath2 = "/home/ubuntu/job_builder_test/table_value/" + table2 + "_" + System.currentTimeMillis();
		
		tableValueJob1 = JobBuilder.newTableValueJob(table1, family1, qualified1, outPath1);
		tableValueJob2 = JobBuilder.newTableValueJob(table2, family2, qualified2, outPath2);
		
		System.exit(tableValueJob2.waitForCompletion(true) ? 0: 1);
	}

}
